import requests
from config import url, headers_web


class Course:
    def __int__(self):
        self.headers = headers_web
        self.url = url

    def get_courseLeader(self, url: str, headers=headers_web, params=None, paramspath=None):
        '''
        summary:获取用户作为课程负责人所管理的课程
        description:1.云课堂教师端-项目配置管理使用
        :param url:
        :param headers:
        :param params:
        :param paramspath:
        :return:
        '''
        url = url + f"/courseApi/v1/user/{paramspath}/courseleader/course"
        r = requests.get(url=url, headers=headers, params=params)
        return r
